package com.finalab.website;

import com.finalab.website.interceptor.AssesInterceptor;
import com.finalab.website.interceptor.EncodingInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebSiteConfig extends WebMvcConfigurerAdapter {

    @Autowired
    EncodingInterceptor encodingIntorceptor;
    @Autowired
    AssesInterceptor assesInterceptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(assesInterceptor);
        registry.addInterceptor(encodingIntorceptor);
    }
}